package org.example.utils;

import cn.hutool.http.HttpUtil;

import java.util.HashMap;

public class HttpClientUtil {

    public static final String url = "http://47.122.10.70:5000";

    /**
     * post请求：传统学习
     * @return
     */
    public static String doPostTradition (Integer step, String filePath) {
        HashMap<String, Object> param = new HashMap<>();
        param.put("filePath", filePath);
        String res = HttpUtil.post(url + "/step" + step, param);
        return res;
    }

    /**
     * post请求：深度学习
     * @return
     */
    public static String doPostDeep (String filePath) {
        HashMap<String, Object> param = new HashMap<>();
        param.put("filePath", filePath);
        String res = HttpUtil.post(url, param);
        return res;
    }

    public static void main(String[] args) {

    }
}
